<div id="app" v-cloak>
    <el-scrollbar style="height: calc(100vh - 100px)">
        <el-form ref="form" :model="form" :rules="rules" label-width="100px">
            <el-form-item label="名称" prop="name">
                <el-input v-model="form.name" style="width: 360px" placeholder="请输入组名" />
            </el-form-item>
            <el-form-item label="上级" prop="pid">
                <mu-tree-select :options="options.pidList" placeholder="请选择上级" label-field="name" value-field="id" v-model="form.pid"></mu-tree-select>
            </el-form-item>
            <el-form-item label="权限" prop="rules">
                <mu-cascader v-model="form.rules" :options="options.rulesList" :multiple="true"  value-field="id" label-field="title"></mu-cascader>
            </el-form-item>
            <el-form-item label="状态" prop="status">
                <el-switch
                        v-model="form.status"
                        :active-value="1"
                        :inactive-value="0">
                </el-switch>
            </el-form-item>
        </el-form>
    </el-scrollbar>
    <div style="display: flex;justify-content: flex-end;margin-top: 20px" class="flex-column flex-item-center">
        <div >
            <el-button type="primary" @click="onSubmitEdit">确认修改</el-button>
            <el-button @click="onCancel">取消</el-button>
        </div>
    </div>
</div>